import request from "@/utils/request";

//支票明细列表
export function getCheckDetailList(params) {
  return request({
    url: "/check/detail",
    method: "get",
    params,
  });
}
//修改支票明细
export function editCheckDetail(data) {
  return request({
    url: `/check/detail/${data.id}`,
    method: "put",
    data,
  });
}

//新增支票明细
export function addCheckDetail(data) {
  return request({
    url: `/check/detail`,
    method: "POST",
    data,
  });
}

//删除支票明细
export function deleteCheckDetail(data) {
  return request({
    url: `/check/detail/${data.id}`,
    method: "delete",
    data,
  });
}
//支票明细审核
export function auditCheckDetail(data) {
  return request({
    url: `/check/detail/review`,
    method: "PATCH",
    data,
  });
}
//支票明细导出
export function exportCheckDetail(data) {
  return request({
    url: `/check/detail/export/all`,
    method: "PATCH",
    data,
  });
}

//承兑汇票列表
export function getAcceptanceBillList(params) {
  return request({
    url: "/check/acceptance/bill",
    method: "get",
    params,
  });
}
//新增承兑汇票
export function addAcceptanceBill(data) {
  return request({
    url: "/check/acceptance/bill",
    method: "post",
    data,
  });
}

//编辑承兑汇票
export function editAcceptanceBill(data) {
  return request({
    url: `/check/acceptance/bill/${data.id}`,
    method: "put",
    data,
  });
}

//删除承兑汇票
export function deleteAcceptanceBill(data) {
  return request({
    url: `/check/acceptance/bill/${data.id}`,
    method: "delete",
    data,
  });
}

//审核承兑汇票
export function reviewAcceptanceBill(data) {
  return request({
    url: `check/acceptance/bill/review`,
    method: "patch",
    data,
  });
}
